<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>aio_return</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_001_140">&nbsp;</a>NAME</h4><blockquote>
aio_return - retrieve return status of an asynchronous I/O operation
(<b>REALTIME</b>)
</blockquote><h4><a name = "tag_000_001_141">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="aio.h.html">aio.h</a>&gt;

ssize_t aio_return(struct aiocb *<i>aiocbp</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_001_142">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>aio_return()</i>
function returns the return status associated with the
<b>aiocb</b>
structure referenced by the
<i>aiocbp</i>
argument.
The return status for an asynchronous I/O operation is the value
that would be returned by the corresponding
<i><a href="read.html">read()</a></i>,
<i><a href="write.html">write()</a></i>,
or
<i><a href="fsync.html">fsync()</a></i>
function call.
If the error status for the operation is equal to
EINPROGRESS,
then the return status for the operation is undefined.
The
<i>aio_return()</i>
function may be called exactly once to retrieve the return status
of a given asynchronous operation;
thereafter, if the same
<b>aiocb</b>
structure is used in a call to
<i>aio_return()</i>
or
<i><a href="aio_error.html">aio_error()</a></i>,
an error may be returned.
When the
<b>aiocb</b>
structure referred to by
<i>aiocbp</i>
is used to submit another asynchronous operation,
then
<i>aio_return()</i>
may be successfully used to retrieve the return status
of that operation.
</blockquote><h4><a name = "tag_000_001_143">&nbsp;</a>RETURN VALUE</h4><blockquote>
If the asynchronous I/O operation has completed, then
the return status, as described for
<i><a href="read.html">read()</a></i>,
<i><a href="write.html">write()</a></i>,
and
<i><a href="fsync.html">fsync()</a></i>,
is returned.
If the asynchronous I/O operation has not yet completed,
the results of
<i>aio_return()</i>
are undefined.
</blockquote><h4><a name = "tag_000_001_144">&nbsp;</a>ERRORS</h4><blockquote>
The 
<i>aio_return()</i>
function will fail if:
<dl compact>

<dt>[EINVAL]<dd>
The
<i>aiocbp</i>
argument does not refer to an asynchronous operation
whose return status has not yet been retrieved.

<dt>[ENOSYS]<dd>
The
<i>aio_return()</i>
function is not supported by this implementation.

</dl>
</blockquote><h4><a name = "tag_000_001_145">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_146">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_147">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_148">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="aio_cancel.html">aio_cancel()</a></i>,
<i><a href="aio_error.html">aio_error()</a></i>,
<i><a href="aio_fsync.html">aio_fsync()</a></i>,
<i><a href="aio_read.html">aio_read()</a></i>,
<i><a href="aio_write.html">aio_write()</a></i>,
<i><a href="close.html">close()</a></i>,
<i><a href="_exit.html">_exit()</a></i>,
<i><a href="exec.html">exec</a></i>,
<i><a href="fork.html">fork()</a></i>,
<i><a href="lio_listio.html">lio_listio()</a></i>,
<i><a href="lseek.html">lseek()</a></i>,
<i><a href="read.html">read()</a></i>.
</blockquote><h4>DERIVATION</h4><blockquote>
Derived from the POSIX Realtime Extension (1003.1b-1993/1003.1i-1995)
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>

